﻿namespace housingsafety.server.Helpers
{
    /// <summary>
    /// 点位附属类型
    /// </summary>
    public class DotAttachContentTypes
    {
        /// <summary>
        /// 判断是不是图片
        /// </summary>
        /// <param name="contentType"></param>
        /// <returns></returns>
        public static bool IsImage(string contentType)
        {
            return contentType.StartsWith("image/");
        }

        /// <summary>
        /// 判断是不是音频
        /// </summary>
        /// <param name="contentType"></param>
        /// <returns></returns>
        public static bool IsAudio(string contentType)
        {
            return contentType.StartsWith("audio/");
        }

        /// <summary>
        /// 判断是不是视频
        /// </summary>
        /// <param name="contentType"></param>
        /// <returns></returns>
        public static bool IsVideo(string contentType)
        {
            return contentType.StartsWith("video/");
        }
    }
}
